

const { ccclass, property } = cc._decorator;

@ccclass
export default class CanvasComponent extends cc.Component {

    @property(cc.Canvas)
    canvas: cc.Canvas = null;

    // LIFE-CYCLE CALLBACKS:

    onLoad() {

        if (cc.sys.isMobile) {
            this.canvas.fitWidth = true;
            this.canvas.fitHeight = true;
        } else {
            cc.view.setFrameSize(1920, 900);
            // this.canvas.designResolution.width = 1920;
            this.canvas.fitWidth = true;
            this.canvas.fitHeight = true;
        }

    }

    start() {

    }

    // update (dt) {}
}
